Kameleon-Plus  0.3.2
Point3f.h
Go to the documentation of this file.
1 #ifndef CCMC_POINT3F_H_
2 #define CCMC_POINT3F_H_
3 #include <iostream>
4 #include <string>
5 
6 namespace ccmc
7 {
8  class Point3f
9  {
10  friend std::ostream& operator<<(std::ostream& out, const Point3f& point);
11  public:
12  //Point3f(const Point3f&);
14  {
16  };
17 
18  Point3f(const float& component1, const float& component2, const float& component3);
19  Point3f(const float& component1, const float& component2, const float& component3, Coordinates c);
20  Point3f(const Point3f& p);
21  Point3f();
23  void normalize();
24  std::string toString() const;
25  float magnitude();
26  float distance(const Point3f& p) const;
27  float component1;
28  float component2;
29  float component3;
30 
31  Point3f operator+(const Point3f& p) const;
32  Point3f operator-(const Point3f& p) const;
33  Point3f operator*(float value) const;
34  Point3f operator*(double value) const;
35 
39 
40  virtual ~Point3f();
41 
42  private:
43  Coordinates coordinates;
44  };
45 
46 }
47 #endif /*CCMC_POINT3F_H_*/